#include<string>
#ifndef public_h
#define public_h
//const double
const double  clight=2.99792458e8;
const double  pi=3.1415926;
const double  dZero=1.0e-10;
const double  dPermit=8.85e-12;
const double  e=1.602e-19;

const double  RemeshFlag=1.000000; //r2/r1
#if 1        //proton
const double  dErest=938.2723;
const double  eOverM=0.95788306*1.0e8;
const double  dMass=1.67e-27;
//const double eOverM=1.60217733/1.6726231*1.0e8;  proton
const int     chargeOverMass=1;
#endif
#if 0        //anti proton
const double  dErest=939.3014;
const double  eOverM=0.9568336*1.0e8; //eOverM=1.60217733/1.6726231*1.0e8*938.2723/939.3014;  anti proton
const int     chargeOverMass=-1;
#endif
double convertEtoB(double);
double convertBtoE(double);
void   FileChangeForTrack(std::string);
double emittance(std::string);
void  FileChangeForImpactT(std::string );
void  FileChangeForImpactT_field2d(std::string );
void  FileChangeForImpactT_field2d_2(std::string ); //coincident with padsc input
//int nlopttest(int argc, char **argv)
#endif
//notes 
//in SpaceCharge2.cpp, whether the field is related to chargeOverMass
//compare the twiss parameters between parmila and padsc.
//compare the 0mA result and see whether they are agree with each other
